package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.system.domain.JingfeiJingfeipici;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.JingfeiDeptMapper;
import com.ruoyi.system.domain.JingfeiDept;
import com.ruoyi.system.service.IJingfeiDeptService;
import com.ruoyi.common.core.text.Convert;

/**
 * jingfeideptService业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-11
 */
@Service
public class JingfeiDeptServiceImpl implements IJingfeiDeptService 
{
    @Autowired
    private JingfeiDeptMapper jingfeiDeptMapper;

    /**
     * 查询jingfeidept
     * 
     * @param id jingfeidept主键
     * @return jingfeidept
     */
    @Override
    public JingfeiDept selectJingfeiDeptById(String id)
    {
        return jingfeiDeptMapper.selectJingfeiDeptById(id);
    }

    /**
     * 查询jingfeidept列表
     * 
     * @param jingfeiDept jingfeidept
     * @return jingfeidept
     */
    @Override
    public List<JingfeiDept> selectJingfeiDeptList(JingfeiDept jingfeiDept)
    {
        return jingfeiDeptMapper.selectJingfeiDeptList(jingfeiDept);
    }

    /**
     * 新增jingfeidept
     * 
     * @param jingfeiDept jingfeidept
     * @return 结果
     */
    @Override
    public int insertJingfeiDept(JingfeiDept jingfeiDept)
    {
        return jingfeiDeptMapper.insertJingfeiDept(jingfeiDept);
    }

    /**
     * 修改jingfeidept
     * 
     * @param jingfeiDept jingfeidept
     * @return 结果
     */
    @Override
    public int updateJingfeiDept(JingfeiDept jingfeiDept)
    {
        return jingfeiDeptMapper.updateJingfeiDept(jingfeiDept);
    }

    /**
     * 批量删除jingfeidept
     * 
     * @param ids 需要删除的jingfeidept主键
     * @return 结果
     */
    @Override
    public int deleteJingfeiDeptByIds(String ids)
    {
        return jingfeiDeptMapper.deleteJingfeiDeptByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除jingfeidept信息
     * 
     * @param id jingfeidept主键
     * @return 结果
     */
    @Override
    public int deleteJingfeiDeptById(String id)
    {
        return jingfeiDeptMapper.deleteJingfeiDeptById(id);
    }

    @Override
    public List<Map<String,Object>>findDWByPiciNameAndDeptId(String ppDeptId, String ppPiciName){
        if(ppPiciName!=null&&!ppPiciName.equals("")){
            ppPiciName ="%"+ppPiciName+"%";
        }
        return jingfeiDeptMapper.findDWByPiciNameAndDeptId(ppDeptId,ppPiciName);
    }
}
